Audio Filtering on the command line and Python
I had recorded the audio on my Apple device and it was default recorded in .m4a format. I convert it to the wav format. I use ffmpeg for the same. In addition, I am using two flags: -v quiet to reduce the amount of information printed on the console. Second, I am using -y to overwrite an existing file with the same name.
!ffmpeg -i Test.m4a Test.wav -v quiet -y
from IPython.display import Audio
import matplotlib.pyplot as plt
%matplotlib inline
Audio("Test.wav")
!ffmpeg -i Test.wav -lavfi showspectrumpic=s=720x540:color='magma' ../images/input-spectogram.png -y -v quiet

As can be seen in the above image, I am speaking somewhere close to 3.70 seconds onwards. However, the audio is pretty noisy before this even though I am not speaking. This is due to the background noise coming in from the fans and the air conditioning system.
!sox Test.wav -n spectrogram -o ../images/sox-sg.png

!sox Test.wav -n rate 32k spectrogram -o ../images/sox-sg-trimmed.png

!ffmpeg -i Test.wav
As can be seen from the cell above, the recording rate is 48 kHz. We will need this when we do some processing in Python.
Building a noise profile from first 3 second
!ffmpeg -i Test.wav -ss 0 -to 3.5 -c copy Noise-Test.wav -v quiet -y
Audio('Noise-Test.wav')
!sox Noise-Test.wav -n rate 32k spectrogram -o ../images/sox-noise.png

!sox Noise-Test.wav -n noiseprof noise.prof
!sox Noise-Test.wav Noise-Test-cleaned.wav noisered noise.prof 0.21
Audio("Noise-Test-cleaned.wav")
!sox Test.wav Test-cleaned-05.wav noisered noise.prof 0.05
!sox Test.wav Test-cleaned-18.wav noisered noise.prof 0.18
!sox Test.wav Test-cleaned-21.wav noisered noise.prof 0.21
Audio("Test-cleaned-05.wav")
Audio("Test-cleaned-18.wav")
Audio("Test-cleaned-21.wav")
!sox Test-cleaned-21.wav -n rate 32k spectrogram -o ../images/sox-cleaned-21.png

!sox Test-cleaned-05.wav -n rate 32k spectrogram -o ../images/sox-cleaned-05.png

Audio("Test-audacity.wav")
!sox Test-audacity.wav -n rate 32k spectrogram -o ../images/sg-audacity.png

!ffmpeg -i Test.wav -filter:a "highpass=f=300" high-passed.wav -y -v quiet

Audio("high-passed.wav")
!sox high-passed.wav -n rate 32k spectrogram -o ../images/highpass.png

import mediapy
orig = mediapy.read_image('../images/sox-sg-trimmed.png')
audacity = mediapy.read_image('../images/sg-audacity.png')
sox_21 = mediapy.read_image('../images/sox-cleaned-21.png')
sox_05 = mediapy.read_image('../images/sox-cleaned-05.png')
high_pass_300 = mediapy.read_image('../images/highpass.png')
mediapy.show_images({'Original':orig,
'Audacity':audacity,
'Sox:0.21':sox_21,
'Sox:0.05':sox_05,
'HPF:300': high_pass_300,},
cmap='magma', columns=4, height=200 )